import { consulateHttp } from '../index';
import qs from 'qs'
export function userLogin(data: { account: string, password: string, [key: string]: any }) {
  return consulateHttp.request({
    method: 'POST',
    data: qs.stringify(data),
    url: '/user/login'
  });
}

export function userAudit(data: { id: string, verified: boolean }) {
  return consulateHttp.request({
    method: 'POST',
    data: qs.stringify(data),
    url: '/user/updateAdvanced'
  });
}

interface AuditBatch {
  id: string,
  verified: boolean
}
export function userAuditBatch(data: AuditBatch[]) {
  return consulateHttp.request({
    method: 'POST',
    data: data,
    url: '/user/batchVerified'
  });
}

export function userUpdateMask(data: { mask: boolean, userIds: string[] }) {
  return consulateHttp.request({
    method: 'POST',
    data: data,
    url: '/user/batchUpdateMask'
  });
}